home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / Utilities / C / ASAP / iostdreq.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-09-09  |  1.7 KB  |  52 lines

  1. /*****************************************************************************
  2.  *                                                                           *
  3.  * ASAP - Amiga Software Authoring Platform                                  *
  4.  *                                                                           *
  5.  * Written by Laurie Perrin                                                  *
  6.  *                                                                           *
  7.  * AIOStdReq wrapper class                                                   *
  8.  *                                                                           *
  9.  *****************************************************************************/
  10.  
  11. #ifndef ASAP_IOStdReq_H
  12. #define ASAP_IOStdReq_H
  13.  
  14. #include <New.h>
  15.  
  16. extern "C"
  17. {
  18.  #include <CLIB/ALIB_PROTOS.h>
  19.  #include <EXEC/IO.h>
  20. }
  21.  
  22. class AIOStdReq : public IOStdReq
  23. {
  24.  public:
  25.  inline static AIOStdReq * CreateStdIO(MsgPort * port);
  26.  inline void * operator new(size_t, MsgPort * port);
  27.  inline void DeleteStdIO();
  28.  inline void operator delete(void *);
  29. };
  30. //----------------------------------------------------------------------------
  31. AIOStdReq * AIOStdReq::CreateStdIO (struct MsgPort * port)
  32. {
  33.  return (AIOStdReq *) ::CreateStdIO(port);
  34. }
  35. //----------------------------------------------------------------------------
  36. void * operator new (size_t, MsgPort * port)
  37. {
  38.  return AIOStdReq::CreateStdIO(port);
  39. }
  40. //----------------------------------------------------------------------------
  41. void AIOStdReq::DeleteStdIO ()
  42. {
  43.  ::DeleteStdIO(this);
  44. }
  45. //----------------------------------------------------------------------------
  46. void AIOStdReq::operator delete(void *ioReq)
  47. {
  48.  ((AIOStdReq *) ioReq)->DeleteStdIO();
  49. }
  50.  
  51. #endif
  52.